<!--
 要情管理：指令
 @Author: zhanbh
 @Date: 2021-04-15
-->
<template>
  <module-tabs class="yq-order" v-model="activeName" :tabs="tabs" is-flex-box>
    <template #first>
      <order ref="order" :zllx="zllx" :jsdwdmList="jsdwdmList" :id="Id"/>
    </template>
    <template #second>
      <all-info />
    </template>
    <!-- TODO:此版本暂时不出现工作流程图 -->
    <!-- <template #thirds>
      <work-flow />
    </template> -->
    <template #header-btns v-if="activeName === 'first'">
      <dg-button type="primary" size="mini" @click="() => $refs.order.onSubmit()">提交</dg-button>
      <dg-button size="mini" @click="() => $router.go(-1)">关闭</dg-button>
    </template>
  </module-tabs>
</template>

<script>
import ModuleTabs from '@/components/layout/module-tabs';
import AllInfo from '@/pages/ExterCommun/detail/components/AllInfo';
import WorkFlow from '@/pages/ExterCommun/detail/components/WorkFlow';
import Order from '../components/Order';

export default {
  name: 'ImpOrder',
  components: {
    ModuleTabs,
    AllInfo,
    WorkFlow,
    Order
  },
  props: {
    zllx: {
      type: String
    },
    jsdwdmList: {
      type: Array,
      deault: () => []
    }
  },
  data() {
    return {
      condition: null,
      loading: false,
      data: [],
      columns: [
        { label: '序号', type: 'index', width: 70 },
        { label: '批阅人', prop: 'psrName' },
        { label: '批阅时间', prop: 'pssj' },
        { label: '批阅内容', prop: 'psnr' },
        { label: '补录人', prop: 'createUserName' },
        { label: '补录时间', prop: 'createTime' },
        { label: '是否公开', type: 'operate' }
      ],
      tabs: [
        {
          label: '指令下发',
          name: 'first'
        },
        {
          label: '基本信息',
          name: 'second'
        },
        // {
        //   label: '工作流程图',  //TODO:此版本暂时不出现工作流程图
        //   name: 'thirds'
        // }
        // {
        //     label: "流程图",
        //     name: "fourth"
        // }
      ],
      activeName: 'first',
      Id:this.$route.params.id // 选中数据的id
    };
  }
};
</script>

<style lang="scss" scoped>
.yq-order {
  height: calc(100vh - 11rem);
}
.edit-form {
  max-width: 1000px;
}
</style>
